export default class gamerover extends Laya.Script {
    // 更多参数说明请访问: https://ldc2.layabox.com/doc/?nav=zh-as-2-4-0
    owner=this.owner as Laya.Sprite
    btn_start=null;
    btn_homepege=null;
    constructor() { super(); }
    
    onAwake(){
        Laya.stage.on("gamerover",this,this.Gamerover)
        this.btn_start=this.owner.getChildByName("btn_start")
        this.btn_homepege=this.owner.getChildByName("btn_homepege")
        this.btn_start.on(Laya.Event.CLICK,this,this.Start)
        this.btn_homepege.on(Laya.Event.CLICK,this,this.homepege)
    }
    homepege(){
        this.owner.visible=false;
        Laya.stage.event("homepege")
    }
    Start(){
        this.owner.visible=false;
        Laya.stage.event("start")
    }
    Gamerover(){
        this.owner.visible=true;
    }
}